package com.annoncesautomobile.modele.local;

import android.content.Context;
import android.content.SharedPreferences;

public class MesCoordonnes {
	private static final String PREFERENCES_NAME = "ANNONCE_AUTO";
	public static final String PROPERTY_NOM_CLIENT = "nom";
	public static final String PROPERTY_TELEPHONE_CLIENT = "telephone";
	public static final String PROPERTY_DEPARTMENT_CLIENT = "idDep";
	public static final String PROPERTY_EMAIL_CLIENT = "email";
	public static final String PROPERTY_DEPARTEMENT_5DIGITS = "dep5";
	public static final String PROPERTY_VILLE = "ville";
	
	public static String getItemClient(Context context, String what) {
		SharedPreferences preferences = context.getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE);
		return preferences.getString(what, "");
	}
	
	public static void setItemClient(Context context, String what,String value) {
		SharedPreferences preferences = context.getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE);
		SharedPreferences.Editor editor = preferences.edit();
		editor.putString(what, value);
		editor.commit();
	}
}
